<template>
  <div>
     <h2>{{ store.state.count }}</h2>
     <button @click="increment">同步+</button>
     <button @click="incrementAsync">异步+</button>
  </div>
</template>

<script lang='ts' setup>
import {useStore} from 'vuex'
const store=useStore()
console.log('store',store);
const increment=()=>{
    store.commit('INCREMENT',2)
}
const incrementAsync=()=>{
    store.dispatch('incrementAsync',3)
}
</script>

<style lang='scss' scoped>
</style>